<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>组件参数校验与非props特性</title>
</head>
<body>
    <div id="app">
        <child content="hello world"></child>
    </div>
</body>
<script src="vue.js"></script>
<script>
    Vue.component('child', {
        /* props: {
            content: {
                type: [String, Number],
                required: false,
                default: 'default value',
                validator: function(value) {
                    return (value.length > 5);
                }
            }
        }, */
        template: '<div>hello</div>'
    })
    var app = new Vue({
        el: '#app',
        data: {
            content: 'hello world!',
        },
        methods: {
            handleIncrease: function(step) {
                this.total+=step;
            }
        }
    })
</script>
</html>